package co.yixiang.hw.service;


import co.yixiang.hw.domain.SupplierGoodsSku;
import co.yixiang.hw.service.dto.SupplierGoodsSkuDto;
import co.yixiang.hw.service.dto.SupplierGoodsSkuQueryCriteria;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
* @author Walert
* @date 2021-03-22
*/
public interface SupplierGoodsSkuService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(SupplierGoodsSkuQueryCriteria criteria, Pageable pageable);
    Map<String,Object> queryAll(Integer level, SupplierGoodsSkuQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<SupplierGoodsSkuDto>
    */
    List<SupplierGoodsSkuDto> queryAll(SupplierGoodsSkuQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return SupplierGoodsSkuDto
     */
    SupplierGoodsSkuDto findById(Integer level, Long id);

    /**
    * 创建
    * @param resources /
    * @return SupplierGoodsSkuDto
    */
    SupplierGoodsSkuDto create(SupplierGoodsSku resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(SupplierGoodsSku resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Long[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<SupplierGoodsSkuDto> all, HttpServletResponse response) throws IOException;

    Map<String,Object> getGoodsSkuListByTypePage(Integer type, Integer level, Integer pageNo, Integer pageSize);
}
